CC = g++
LIBS= -lSDL_image -lSDL -lpthread

all : serv cli

serv : serv.cpp servPartida.cpp Mensajes.cpp sockets_s.o tateti.o
	$(CC) serv.cpp servPartida.cpp Mensajes.cpp -lpthread -o serv sockets_s.o tateti.o $(LIBS)

cli : cli.cpp pantalla.o sockets_c.o letras.o
	$(CC) cli.cpp pantalla.o sockets_c.o -o cli $(LIBS)
	
pantalla.o: include/sdl/pantalla.cpp
	$(CC) -c include/sdl/pantalla.cpp $(LIBS)

sockets_c.o: include/sockets/sockets_c.cpp
	$(CC) -c include/sockets/sockets_c.cpp -lpthread

sockets_s.o: include/sockets/sockets_s.cpp
	$(CC) -c include/sockets/sockets_s.cpp -lpthread

tateti.o: include/s_func/tateti.cpp
	$(CC) -c include/s_func/tateti.cpp

letras.o : include/sdl/letrasPantalla/letras.cpp
	$(CC) -c include/sdl/letrasPantalla/letras.cpp

clean :
	rm *.o serv cli
